<script>
import { ref } from 'vue'

export default{
    name:"Person",
    setup(){
        let name=ref("zs")
        function updatename(){
            name.value="ww"
        }
        return {name,updatename}//a:name
    }
}
</script>

<template>
<h1>我是子主键</h1>
<h2>{{ msg }}{{ age }}</h2>
<button v-on:click="add">增加</button>
<h3>{{ name }}</h3>  
<!-- a -->
 <button v-on:click="updatename">修改名字</button>
</template>

<style scoped>
</style>
